%table.settings
  %thead
    %tr
      %th== Setting (#{Axis.legend})
      %th Value
      %th.action

  %tbody
    - settings.each do |s|
      %tr
        %td= s.name
        %td= s.value
        %td.action
          = link_to('override', popup_new_setting_setting_overrides_url(s, :bucket_id => @bucket), :rel => 'facebox')
          = link_to('remove', remove_bucket_setting_url(@bucket, s), :method => :put) 
      - s.ordered_setting_overrides.each do |so|
        %tr.override
          %td== #{so.context}
          %td= so.value
          %td.action
            = link_to('edit', popup_edit_setting_override_url(so, :bucket_id => @bucket), :rel => 'facebox', :id => so.to_param)
            = link_to('delete', setting_override_url(so, :bucket_id => @bucket), :method => :delete)

%script
  == $('a[rel*=facebox]').facebox()    
